package com.design.strategy.test;

import com.design.strategy.MallardDuck;
import com.design.strategy.ModelDuck;
import com.design.strategy.service.impl.FlyRocketPowered;

/**
 * @author zhengzihong
 * @version 1.0.0
 * @date 2018/9/8
 * @Description
 */
public class MiniDckSimulator {

    public static void main(String[] args) {
        MallardDuck mallardDuck = new MallardDuck();
        mallardDuck.performFly();
        mallardDuck.performQuack();


        ModelDuck duck = new ModelDuck();
        duck.performFly();
        duck.setFlyBehavior(new FlyRocketPowered());
        duck.performFly();
        duck.performQuack();

    }
}
